<?php
include 'mysql.php';
if(isset($_GET['action'])&&$_GET['action'])
{

    if($_GET['action']=='delete')
    {
        if(isset($_GET['id'])&&$_GET['id'])
        {
            $id = $_GET['id'];
            $query = "DELETE FROM `activity` WHERE  id = '".$id."' ";
            $result=$mysqli->query($query);
            header("Location:/activity.php");


        }
    }



    if($_GET['action']=='delete_message')
    {
        if(isset($_GET['id'])&&$_GET['id'])
        {
            $id = $_GET['id'];
            $query = "DELETE FROM `message` WHERE  id = '".$id."' ";
            $result=$mysqli->query($query);
            header("Location:/message.php");
        }
    }


}

$mysqli->close();
